package com.infore.dataReceiving.conf;
import io.netty.handler.codec.string.StringDecoder;
import io.netty.handler.codec.string.StringEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.nio.charset.Charset;

/**
 * @author zzh
 */
@Configuration
public class NettyConfig1 {
    
    @Bean(name = "stringEncoder")
    public StringEncoder stringEncoder() {
        return new StringEncoder(Charset.forName("GBK"));
    }

    @Bean(name = "stringDecoder")
    public StringDecoder stringDecoder() {
        return new StringDecoder(Charset.forName("GBK"));
    }
}